import vue from 'vue'
import vuex from 'vuex'
import state from './state'
import mutations from './mutations'

vue.use(vuex)

export default new vuex.Store({  //city:localStorage.city||"湖北" //保存本地数据
    state:state,
    actions:{                                 //修改数据必须用 commit
        changecity(ctx,city){
            ctx.commit('chay',city) 
        }
    },
    mutations
})
//引用
